namespace STOWaybillMall.Core
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    //using System.Data.Entity.Spatial;

    [Table("OrderBaseInfo")]
    public partial class OrderBaseInfo
    {
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public OrderBaseInfo()
        {
            OrderAuditInfo = new HashSet<OrderAuditInfo>();
            OrderSplitInfo = new HashSet<OrderSplitInfo>();
        }

        [Key]
        [StringLength(32)]
        public string OrderID { get; set; }

        public long UserID { get; set; }

        public byte OrderType { get; set; }

        public DateTime CreationTime { get; set; }

        public Guid? OrderReceiptInfoID { get; set; }

        public Guid? OrderExpressID { get; set; }

        public string ProductSnap { get; set; }

        public string PaymentSnap { get; set; }

        [Column(TypeName = "money")]
        public decimal? TotalFee { get; set; }

        [Column(TypeName = "money")]
        public decimal? NeedPayFee { get; set; }

        [StringLength(200)]
        public string Remarks { get; set; }

        [StringLength(200)]
        public string LeaveMsg { get; set; }

        public Guid? OrderPaymentID { get; set; }

        public byte? OrderStatus { get; set; }

        [Column(TypeName = "money")]
        public decimal? BalanceOfDeduction { get; set; }

        public DateTime? AutoCloseTime { get; set; }

        [StringLength(32)]
        public string SplitFormOrderID { get; set; }

        public DateTime? AutoCompleteTime { get; set; }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<OrderAuditInfo> OrderAuditInfo { get; set; }

        public virtual OrderCloseInfo OrderCloseInfo { get; set; }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<OrderSplitInfo> OrderSplitInfo { get; set; }
    }
}
